package Day2025_03_02;

public class HomeWork02 {
    public static void insertSort(int[] array) {
        for (int i = 1; i < array.length; i++) {
            int j = i - 1;
            int tmp = array[i];
            for (; j >= 0; j--) {
                if(array[j] > tmp) array[j+1] = array[j];
                else break;
            }
            array[j+1] = tmp;
        }
    }
}
